package com.watchmen.clickhouse.config;

import java.util.Properties;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.github.pagehelper.PageHelper;
/**
 * 
 * @author kk
 * MybatisPlus相关配置
 */
@Configuration
public class MybatisPlusConfig {

	  @Bean
	  public PageHelper pageHelper() {
	      PageHelper pageHelper = new PageHelper();
	      Properties properties = new Properties();
	      properties.setProperty("offsetAsPageNum", "true");
	      properties.setProperty("rowBoundsWithCount", "true");
	      properties.setProperty("reasonable", "true");
	      pageHelper.setProperties(properties);
	      return pageHelper;
	  }
}
